//
//  CustomButton.swift
//  HostingPlan
//
//  Created by WangWeiShuo on 2025/8/20.
//

import SwiftUI

struct CustomButton: View {
    let name: String
    let action: () -> Void
    
    var body: some View {
        Button(action: action) {
            Text(name)
                .foregroundColor(.white)
                .font(.system(size: 16, weight: .bold))
                .frame(maxWidth: .infinity)
                .padding()
                .background(
                    Capsule()                           // 圆角胶囊
                        .fill(Color.blue)               // 背景颜色
                        .shadow(color: .black.opacity(0.1),
                                radius: 8, x: 0, y: 2)
                )
                .padding(.horizontal)
        }
    }
}

#Preview {
    CustomButton(name: "dd") {
        
    }
}
